projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d01737
)
Avoid division by 0 in the border rendering code
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 9 Jan 2016 22:30:33 +0000
(17:30 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 10 Jan 2016 04:44:43 +0000
(23:44 -0500)
We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
gtk/gtkrenderborder.c
patch
|
blob
|
history
diff --git
a/gtk/gtkrenderborder.c
b/gtk/gtkrenderborder.c
index 22452d15cb377778b0e3a8eab6310e622c5b9e87..84f81428cfc906dfbd110b48b24d9680d37207f6 100644
(file)
--- a/
gtk/gtkrenderborder.c
+++ b/
gtk/gtkrenderborder.c
@@
-518,11
+518,14
@@
render_frame_stroke (cairo_t *cr,
border_width[GTK_CSS_BOTTOM],
border_width[GTK_CSS_LEFT]);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
{
if (hidden_side & (1 << i))
continue;
+ if (border_width[i] == 0)
+ continue;
+
cairo_save (cr);
if (i == 0)